package com.tyl.xtk.beans.po;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * create by tyl at 2025/8/27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(name = "用户")
@TableName("user_info")
public class User extends Record {
    @Schema(description = "id")
    private Long id;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "密码")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
    private String password;

    @Schema(description = "邮箱", example = "aaa@aaa.com")
    private String email;

    @Schema(description = "手机号")
    private String phone;
}